[POWERPC][XEN] implement the UP side of __flush_tlb_mask()
authorJimi Xenidis <jimix@watson.ibm.com>
Sat, 7 Oct 2006 20:25:46 +0000 (16:25 -0400)
committerJimi Xenidis <jimix@watson.ibm.com>
Sat, 7 Oct 2006 20:25:46 +0000 (16:25 -0400)
The SMP side will need to be done soone enough
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : %E3%03v%A0%AB%C3%91%17%F6%04%B0%F6%CCx%17%DE%B3%EB%90y

xen/arch/powerpc/smp.c

index 4667518a2b2717c993d01e743b463356af7b8fd7..700d11176bef51d85c34816d50c7571c55e90d91 100644 (file)
@@ -29,7 +29,21 @@ int ht_per_core = 1;
 
 void __flush_tlb_mask(cpumask_t mask, unsigned long addr)
 {
-    unimplemented();
+    if (cpu_isset(smp_processor_id(), mask)) {
+            cpu_clear(smp_processor_id(), mask);
+            if (cpus_empty(mask)) {
+                /* only local */
+                if (addr == FLUSH_ALL_ADDRS)
+                    local_flush_tlb();
+                else
+                    local_flush_tlb_one(addr);
+                return;
+            }
+    }
+    /* if we are still here and the mask is non-empty, then we need to
+     * flush other TLBs so we flush em all */
+    if (!cpus_empty(mask))
+        unimplemented();
 }
 
 void smp_send_event_check_mask(cpumask_t mask)